<?php /* Smarty version 2.6.18, created on 2015-09-01 08:00:51
         compiled from synthesisinfo.html */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?> <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "top.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?> <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "left.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<div class="main-content">
<div class="breadcrumbs" id="breadcrumbs"><script
	type="text/javascript">
	try {
		ace.settings.check('breadcrumbs', 'fixed')
	} catch (e) {
	}
</script>

<ul class="breadcrumb">
	<li><i class="icon-home home-icon"></i> <a
		href="index.php">首页</a></li>
</ul>
<!-- .breadcrumb --></div>

<div class="page-content">
<div class="col-xs-12">
<div class="alert alert-info">
<form class="form-horizontal" role="form">
<div class="row">

<div class="col-sm-3">
<div class="row">
<label class="col-sm-3 control-label no-padding-right" for="form-field-5">游戏</label>
<div class="col-sm-3"><select id="selectGame">
	<option value="" >游戏</option>
	<?php if ($this->_tpl_vars['selectGames']): ?> <?php $_from = $this->_tpl_vars['selectGames']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
	<?php if ($this->_tpl_vars['nowGame'] == $this->_tpl_vars['value']): ?>
	<option value="<?php echo $this->_tpl_vars['value']; ?>
" selected><?php echo $this->_tpl_vars['value']; ?>
</option>
	<?php else: ?>
	<option value="<?php echo $this->_tpl_vars['value']; ?>
"><?php echo $this->_tpl_vars['value']; ?>
</option>
	<?php endif; ?> <?php endforeach; endif; unset($_from); ?> <?php endif; ?>
</select>
</div>
</div>
</div>

<div class="col-sm-3">
<div class="row">
<label class="col-sm-3 control-label no-padding-right" for="form-field-5">区服</label>
<div class="col-sm-3">
<select style="width:120px;" id="selectServer">
	<option value="" id="server">区服</option>
	
	<?php if ($this->_tpl_vars['serverLists']): ?> <?php $_from = $this->_tpl_vars['serverLists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['serverList']):
?>
	<?php if ($this->_tpl_vars['nowServer'] == $this->_tpl_vars['serverList']['server']): ?>
	<option value="<?php echo $this->_tpl_vars['serverList']['server']; ?>
" selected><?php echo $this->_tpl_vars['serverList']['server']; ?>
</option>
	<?php else: ?>
	<option value="<?php echo $this->_tpl_vars['serverList']['server']; ?>
"><?php echo $this->_tpl_vars['serverList']['server']; ?>
</option>
	<?php endif; ?> <?php endforeach; endif; unset($_from); ?> <?php endif; ?>
	
</select>
</div>
</div>
</div>

<div class="col-sm-3">
	<label class="col-sm-3 control-label no-padding-right" for="form-field-5">日期</label>
	<div class="input-group"><span class="input-group-addon"> <i
	class="icon-calendar bigger-110"></i> </span> <input
	class="date-picker col-xs-9 col-sm-9" id="startTime"
	value="<?php echo $this->_tpl_vars['selectDate']; ?>
" type="text" data-date-format="yyyy-mm-dd" /></div>
</div>


<div class="col-sm-2">
<center>
<button type="button" onClick="formSubmit();"
	class="width-50 btn btn-sm btn-primary">查询</button>
</center>
</div>

</div>
</form>
</div>
</div>
<div class="col-xs-12">
<div class="table-header">
留存信息
</div>



<div id="view"  class="table-responsive">
<table id="sample-table-4"
	class="table table-striped table-bordered table-hover">
	<thead>
	
		<tr>
			<th>状态</th>
			<th>日期</th>
			<th>在线人数</th>
			
			<th>总用户</th>
			<th>总设备</th>
			<th>总付费用户</th>
			<th>总付费设备</th>
			<th>总付费金额</th>
			
			<th>新增用户</th>
			<th>新增设备</th>
			
			<th>DAU</th>
			<th>昨日用户留存</th>
			<th>昨日设备留存</th>
			
			<th>当日付费用户</th>
			<th>当日付费设备</th>
			<th>当日付费金额</th>

		</tr>
	<thead>
	<thead>
	<tbody>
	<?php if ($this->_tpl_vars['status'] && $this->_tpl_vars['status'] == 1): ?>
		<tr>
			<td><?php echo $this->_tpl_vars['status']; ?>
</td>
			<td><?php echo $this->_tpl_vars['date']; ?>
</td>
			<td><?php echo $this->_tpl_vars['online']; ?>
</td>
			
			<td><?php echo $this->_tpl_vars['totalUsers']; ?>
</td>
			<td><?php echo $this->_tpl_vars['totalDevice']; ?>
</td>
			<td><?php echo $this->_tpl_vars['totalPayUsers']; ?>
</td>
			<td><?php echo $this->_tpl_vars['totalPayDevice']; ?>
</td>
			<td><?php echo $this->_tpl_vars['totalPayMoney']; ?>
</td>
			
			<td><?php echo $this->_tpl_vars['newUsers']; ?>
</td>
			<td><?php echo $this->_tpl_vars['newDevice']; ?>
</td>
			
			<td><?php echo $this->_tpl_vars['dailyActiveUsers']; ?>
</td>
			<td><?php echo $this->_tpl_vars['userRetentionRate']; ?>
</td>
			<td><?php echo $this->_tpl_vars['deviceRetentionRate']; ?>
</td>
			
			<td><?php echo $this->_tpl_vars['payUsers']; ?>
</td>
			<td><?php echo $this->_tpl_vars['payDevice']; ?>
</td>
			<td><?php echo $this->_tpl_vars['payMoney']; ?>
</td>
			
		</tr>
	<?php endif; ?>	

	</tbody>
</table>
</div>


<!-- /.table-responsive --></div>
</div>
<!-- /.page-content --></div>
<!-- /.main-content -->
<script type="text/javascript">


	jQuery(function($) {
		$('.date-picker').datepicker({
			autoclose : true
		}).next().on(ace.click_event, function() {
			$(this).prev().focus();
		});

		var oTable1 = $('#sample-table-2').dataTable({
			"aoColumns" : [ {
				"bSortable" : false
			}, {
				"bSortable" : false
			}, {
				"bSortable" : false
			}, {
				"bSortable" : false
			}, {
				"bSortable" : false
			}, {
				"bSortable" : false
			}, {
				"bSortable" : false
			}
			]
		});
	});

	function formSubmit() {
		var game = $('#selectGame').val();
		var date = $('#startTime').val();
		var selectServer = $('#selectServer').val();
		
		if (!game || !date || !selectServer) {
			alert("请将查询条件填写完整!");
		} else {
				url = "index.php?mod=Gm&do=synthesisinfo&action=1&game="
					+ game
					+ "&date="
					+ date
					+ "&selectServer="
					+ selectServer;
			window.location.href = url;
		}
	 }
	
	
	window.onload = function(){
	    var select = document.getElementById('selectGame');
	    select.onchange = function(){
	        // 更改值后执行的代码
	       var gameName = jQuery("#selectGame  option:selected").text();
	       var game = $('#selectGame').val();
			url = "index.php?mod=Gm&do=synthesisinfo&action=1&game="+game;
			window.location.href = url;  
	    }
	} 
</script>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
